package br.univas.vperiod.jowey.dao;

import java.util.ArrayList;

import org.hibernate.SessionFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;

import br.univas.vperiod.jowey.entities.TimeReport;

@Repository
@Transactional
public class TimeReportDAO implements ITimeReportDAO<TimeReport> {
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	@Autowired
	private SessionFactory factory;

	@SuppressWarnings("unchecked")
	public ArrayList<TimeReport> findAll() {
		return (ArrayList<TimeReport>) factory.getCurrentSession().createCriteria(TimeReport.class).list();
	}
}
